51ea5d17d768b310451b24c8f2f01b8fb02569b3,cdap-app-fabric/src/main/java/co/cask/cdap/internal/app/runtime/adapter/AdapterService.java,AdapterService,schedule,#String#ApplicationSpecification#AdapterTypeInfo#AdapterSpecification#,272
Before Change
// Schedule all the programs needed for the adapter. Currently, only scheduling of workflow is supported.
private void schedule(String namespaceId, ApplicationSpecification spec, AdapterTypeInfo adapterTypeInfo,
AdapterSpecification adapterSpec) {
checkWorkflow(adapterTypeInfo.getProgramType());
Map<String, WorkflowSpecification> workflowSpecs = spec.getWorkflows();
for (Map.Entry<String, WorkflowSpecification> entry : workflowSpecs.entrySet()) {
Id.Program programId = Id.Program.from(namespaceId, spec.getName(), entry.getValue().getName());
After Change
// Schedule all the programs needed for the adapter. Currently, only scheduling of workflow is supported.
private void schedule(String namespaceId, ApplicationSpecification spec, AdapterTypeInfo adapterTypeInfo,
AdapterSpecification adapterSpec) {
ProgramType programType = adapterTypeInfo.getProgramType();
// Only Workflows are supported to be scheduled in the current implementation
Preconditions.checkArgument(programType.equals(ProgramType.WORKFLOW),
String.format("Unsupported program type %s for adapter", programType.toString()));
Map<String, WorkflowSpecification> workflowSpecs = spec.getWorkflows();
for (Map.Entry<String, WorkflowSpecification> entry : workflowSpecs.entrySet()) {
Id.Program programId = Id.Program.from(namespaceId, spec.getName(), entry.getValue().getName());